-- GENERATED SPELL FOR [Ethereum Researcher] --


function spell0_20456(pUnit, Event) --@Energy Charge,Self--
pUnit:FullCastSpellOnTarget(36506,pUnit)
pUnit:RegisterEvent('Sorts_20456', 8000, 1)
end

function spell1_20456(pUnit, Event) --@Energy Overload,n/a--
pUnit:FullCastSpellOnTarget(35508,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20456', 30341, 1)
end

function spell2_20456(pUnit, Event) --@Energy Surge,n/a--
pUnit:FullCastSpellOnTarget(36508,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20456', 5000, 1)
end

function spell3_20456(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20456', 3000, 1)
end

function Sorts_20456(pUnit, Event)
local choix_sorts_20456 = math.random(0, 3)
if choix_sorts_20456 == 0 then
pUnit:RegisterEvent('spell0_20456', 1, 1)
end
if choix_sorts_20456 == 1 then
pUnit:RegisterEvent('spell1_20456', 1, 1)
end
if choix_sorts_20456 == 2 then
pUnit:RegisterEvent('spell2_20456', 1, 1)
end
if choix_sorts_20456 == 3 then
pUnit:RegisterEvent('spell3_20456', 1, 1)
end
end

function mob20456_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20456', math.random(1500, 3000), 1)
end

function mob20456_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20456_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20456_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20456, 1, 'mob20456_Action')
RegisterUnitEvent(20456, 2, 'mob20456_Leave')
RegisterUnitEvent(20456, 3, 'mob20456_Kill')
RegisterUnitEvent(20456, 4, 'mob20456_Die')
